From b2d379a340dc4a1908f700e0b0100d241c091a49 Mon Sep 17 00:00:00 2001 From: Lapo Calamandrei Date: Fri, 9 Oct 2015 16:27:30 +0200 Subject: [PATCH] Adwaita: stop consider buttons on osd 'linked' we used to consider every button inside osd containers linked, this is not true anymore, now those buttons behave normally. This will clearly cause breakage in applications. --- gtk/theme/Adwaita/_common.scss | 34 ------------------------ gtk/theme/Adwaita/gtk-contained-dark.css | 26 ++++-------------- gtk/theme/Adwaita/gtk-contained.css | 26 ++++-------------- 3 files changed, 10 insertions(+), 76 deletions(-) diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss index b4e6629318..9101a8cb68 100644 --- a/gtk/theme/Adwaita/_common.scss +++ b/gtk/theme/Adwaita/_common.scss @@ -444,46 +444,17 @@ $_dot_color: if($variant=='light', $selected_bg_color, //overlay / OSD style .osd & { @include button(osd); - // there's a problem with sass which prevents it to extend the linked - // placeholder as expected, it should just be "@extend %linked;", the - // placeholder is basically replicated here - // - // Workaround START - border-radius: 0; - border-left-style: none; - &:dir(rtl) { - border-radius: 0; - border-right-style: none; - border-left-style: solid - } - &:first-child { - border-radius: 3px 0 0 3px; - border-left-style: solid; - } - &:last-child { - border-radius: 0 3px 3px 0; - &:dir(rtl) { border-right-style: solid; } - } - &:only-child { - border-radius: 3px; - border-style: solid; - } - // Workaround END &:hover { @include button(osd-hover); - @extend %linked; } &:active, &:checked, &:backdrop:active, &:backdrop:checked { @include button(osd-active); - @extend %linked; } &:insensitive, &:backdrop:insensitive { @include button(osd-insensitive); - @extend %linked; } &:backdrop { @include button(osd-backdrop); - @extend %linked; } &.flat { @include button(undecorated); @@ -547,22 +518,17 @@ $_dot_color: if($variant=='light', $selected_bg_color, } .osd & { @include button(osd, $b_color); - @extend %linked; &:hover { @include button(osd-hover, $b_color); - @extend %linked; } &:active, &:checked, &:backdrop:active, &:backdrop:checked { @include button(osd-active, $b_color); - @extend %linked; } &:insensitive, &:backdrop:insensitive { @include button(osd-insensitive, $b_color); - @extend %linked; } &:backdrop { @include button(osd-backdrop, $b_color); - @extend %linked; } } } diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css index d327d0eb9e..6d2659a2b2 100644 --- a/gtk/theme/Adwaita/gtk-contained-dark.css +++ b/gtk/theme/Adwaita/gtk-contained-dark.css @@ -503,23 +503,7 @@ GtkTextView { box-shadow: inset 0 1px rgba(255, 255, 255, 0.1); text-shadow: 0 1px black; icon-shadow: 0 1px black; - outline-color: rgba(238, 238, 236, 0.3); - border-radius: 0; - border-left-style: none; } - .osd .button:dir(rtl) { - border-radius: 0; - border-right-style: none; - border-left-style: solid; } - .osd .button:first-child { - border-radius: 3px 0 0 3px; - border-left-style: solid; } - .osd .button:last-child { - border-radius: 0 3px 3px 0; } - .osd .button:last-child:dir(rtl) { - border-right-style: solid; } - .osd .button:only-child { - border-radius: 3px; - border-style: solid; } + outline-color: rgba(238, 238, 236, 0.3); } .osd .button:hover { color: white; border-color: rgba(0, 0, 0, 0.7); @@ -1073,7 +1057,7 @@ GtkTextView { .inline-toolbar .header-bar GtkToolButton:backdrop > .button.titlebutton, .header-bar .inline-toolbar GtkToolButton:backdrop > .button.titlebutton, .inline-toolbar .titlebar GtkToolButton:backdrop > .button.titlebutton, -.titlebar .inline-toolbar GtkToolButton:backdrop > .button.titlebutton, .linked:not(.vertical) > .entry, .osd .button:hover, .osd .button:active, .osd .button:checked, .osd .button:backdrop:active, .osd .button:backdrop:checked, .osd .button:insensitive, .osd .button:backdrop:insensitive, .osd .button:backdrop, .osd .button.suggested-action, .osd .button.suggested-action:hover, .osd .button.suggested-action:active, .osd .button.suggested-action:checked, .osd .button.suggested-action:backdrop:active, .osd .button.suggested-action:backdrop:checked, .osd .button.suggested-action:insensitive, .osd .button.suggested-action:backdrop:insensitive, .osd .button.suggested-action:backdrop, .osd .button.destructive-action, .osd .button.destructive-action:hover, .osd .button.destructive-action:active, .osd .button.destructive-action:checked, .osd .button.destructive-action:backdrop:active, .osd .button.destructive-action:backdrop:checked, .osd .button.destructive-action:insensitive, .osd .button.destructive-action:backdrop:insensitive, .osd .button.destructive-action:backdrop, .inline-toolbar .button, .inline-toolbar .header-bar .button.titlebutton, .header-bar .inline-toolbar .button.titlebutton, +.titlebar .inline-toolbar GtkToolButton:backdrop > .button.titlebutton, .linked:not(.vertical) > .entry, .inline-toolbar .button, .inline-toolbar .header-bar .button.titlebutton, .header-bar .inline-toolbar .button.titlebutton, .inline-toolbar .titlebar .button.titlebutton, .titlebar .inline-toolbar .button.titlebutton, .inline-toolbar .button:backdrop, .linked > .button, .header-bar .linked > .button.titlebutton, .titlebar .linked > .button.titlebutton, .linked > .button:hover, .linked > .button:active, .linked > .button:checked, .linked > .button:backdrop, .linked > GtkComboBox > .the-button-in-the-combobox:dir(ltr), .linked > GtkComboBox > .the-button-in-the-combobox:dir(rtl), @@ -1082,7 +1066,7 @@ GtkTextView { border-radius: 0; border-right-style: none; } -.linked:not(.vertical) > .entry:first-child, .osd .button:first-child:hover, .osd .button:first-child:active, .osd .button:first-child:checked, .osd .button:first-child:insensitive, .osd .button:first-child:backdrop, .osd .button.suggested-action:first-child, .osd .button.destructive-action:first-child, .inline-toolbar .button:first-child, .linked > .button:first-child, .header-bar .linked > .button.titlebutton:first-child, +.linked:not(.vertical) > .entry:first-child, .inline-toolbar .button:first-child, .linked > .button:first-child, .header-bar .linked > .button.titlebutton:first-child, .titlebar .linked > .button.titlebutton:first-child, .inline-toolbar.toolbar GtkToolButton:first-child > .button.flat, .inline-toolbar GtkToolButton:first-child > .button.flat, .inline-toolbar.search-bar GtkToolButton:first-child > .button.flat, .inline-toolbar.location-bar GtkToolButton:first-child > .button.flat, .inline-toolbar.toolbar GtkToolButton:first-child > .sidebar-button.button, .inline-toolbar GtkToolButton:first-child > .sidebar-button.button, .inline-toolbar.search-bar GtkToolButton:first-child > .sidebar-button.button, .inline-toolbar.location-bar GtkToolButton:first-child > .sidebar-button.button, .inline-toolbar .header-bar GtkToolButton:first-child > .button.titlebutton, .header-bar .inline-toolbar GtkToolButton:first-child > .button.titlebutton, .inline-toolbar .titlebar GtkToolButton:first-child > .button.titlebutton, .titlebar .inline-toolbar GtkToolButton:first-child > .button.titlebutton, @@ -1101,7 +1085,7 @@ GtkTextView { .linked > GtkComboBoxText:first-child > .the-button-in-the-combobox { border-top-left-radius: 3px; border-bottom-left-radius: 3px; } -.linked:not(.vertical) > .entry:last-child, .osd .button:last-child:hover, .osd .button:last-child:active, .osd .button:last-child:checked, .osd .button:last-child:insensitive, .osd .button:last-child:backdrop, .osd .button.suggested-action:last-child, .osd .button.destructive-action:last-child, .inline-toolbar .button:last-child, .linked > .button:last-child, .header-bar .linked > .button.titlebutton:last-child, +.linked:not(.vertical) > .entry:last-child, .inline-toolbar .button:last-child, .linked > .button:last-child, .header-bar .linked > .button.titlebutton:last-child, .titlebar .linked > .button.titlebutton:last-child, .inline-toolbar.toolbar GtkToolButton:last-child > .button.flat, .inline-toolbar GtkToolButton:last-child > .button.flat, .inline-toolbar.search-bar GtkToolButton:last-child > .button.flat, .inline-toolbar.location-bar GtkToolButton:last-child > .button.flat, .inline-toolbar.toolbar GtkToolButton:last-child > .sidebar-button.button, .inline-toolbar GtkToolButton:last-child > .sidebar-button.button, .inline-toolbar.search-bar GtkToolButton:last-child > .sidebar-button.button, .inline-toolbar.location-bar GtkToolButton:last-child > .sidebar-button.button, .inline-toolbar .header-bar GtkToolButton:last-child > .button.titlebutton, .header-bar .inline-toolbar GtkToolButton:last-child > .button.titlebutton, .inline-toolbar .titlebar GtkToolButton:last-child > .button.titlebutton, .titlebar .inline-toolbar GtkToolButton:last-child > .button.titlebutton, @@ -1121,7 +1105,7 @@ GtkTextView { border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-right-style: solid; } -.linked:not(.vertical) > .entry:only-child, .osd .button:only-child:hover, .osd .button:only-child:active, .osd .button:only-child:checked, .osd .button:only-child:insensitive, .osd .button:only-child:backdrop, .osd .button.suggested-action:only-child, .osd .button.destructive-action:only-child, .inline-toolbar .button:only-child, .linked > .button:only-child, .header-bar .linked > .button.titlebutton:only-child, +.linked:not(.vertical) > .entry:only-child, .inline-toolbar .button:only-child, .linked > .button:only-child, .header-bar .linked > .button.titlebutton:only-child, .titlebar .linked > .button.titlebutton:only-child, .inline-toolbar.toolbar GtkToolButton:only-child > .button.flat, .inline-toolbar GtkToolButton:only-child > .button.flat, .inline-toolbar.search-bar GtkToolButton:only-child > .button.flat, .inline-toolbar.location-bar GtkToolButton:only-child > .button.flat, .inline-toolbar.toolbar GtkToolButton:only-child > .sidebar-button.button, .inline-toolbar GtkToolButton:only-child > .sidebar-button.button, .inline-toolbar.search-bar GtkToolButton:only-child > .sidebar-button.button, .inline-toolbar.location-bar GtkToolButton:only-child > .sidebar-button.button, .inline-toolbar .header-bar GtkToolButton:only-child > .button.titlebutton, .header-bar .inline-toolbar GtkToolButton:only-child > .button.titlebutton, .inline-toolbar .titlebar GtkToolButton:only-child > .button.titlebutton, .titlebar .inline-toolbar GtkToolButton:only-child > .button.titlebutton, diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css index e553f34a90..628da3be14 100644 --- a/gtk/theme/Adwaita/gtk-contained.css +++ b/gtk/theme/Adwaita/gtk-contained.css @@ -503,23 +503,7 @@ GtkTextView { box-shadow: inset 0 1px rgba(255, 255, 255, 0.1); text-shadow: 0 1px black; icon-shadow: 0 1px black; - outline-color: rgba(238, 238, 236, 0.3); - border-radius: 0; - border-left-style: none; } - .osd .button:dir(rtl) { - border-radius: 0; - border-right-style: none; - border-left-style: solid; } - .osd .button:first-child { - border-radius: 3px 0 0 3px; - border-left-style: solid; } - .osd .button:last-child { - border-radius: 0 3px 3px 0; } - .osd .button:last-child:dir(rtl) { - border-right-style: solid; } - .osd .button:only-child { - border-radius: 3px; - border-style: solid; } + outline-color: rgba(238, 238, 236, 0.3); } .osd .button:hover { color: white; border-color: rgba(0, 0, 0, 0.7); @@ -1073,7 +1057,7 @@ GtkTextView { .inline-toolbar .header-bar GtkToolButton:backdrop > .button.titlebutton, .header-bar .inline-toolbar GtkToolButton:backdrop > .button.titlebutton, .inline-toolbar .titlebar GtkToolButton:backdrop > .button.titlebutton, -.titlebar .inline-toolbar GtkToolButton:backdrop > .button.titlebutton, .linked:not(.vertical) > .entry, .osd .button:hover, .osd .button:active, .osd .button:checked, .osd .button:backdrop:active, .osd .button:backdrop:checked, .osd .button:insensitive, .osd .button:backdrop:insensitive, .osd .button:backdrop, .osd .button.suggested-action, .osd .button.suggested-action:hover, .osd .button.suggested-action:active, .osd .button.suggested-action:checked, .osd .button.suggested-action:backdrop:active, .osd .button.suggested-action:backdrop:checked, .osd .button.suggested-action:insensitive, .osd .button.suggested-action:backdrop:insensitive, .osd .button.suggested-action:backdrop, .osd .button.destructive-action, .osd .button.destructive-action:hover, .osd .button.destructive-action:active, .osd .button.destructive-action:checked, .osd .button.destructive-action:backdrop:active, .osd .button.destructive-action:backdrop:checked, .osd .button.destructive-action:insensitive, .osd .button.destructive-action:backdrop:insensitive, .osd .button.destructive-action:backdrop, .inline-toolbar .button, .inline-toolbar .header-bar .button.titlebutton, .header-bar .inline-toolbar .button.titlebutton, +.titlebar .inline-toolbar GtkToolButton:backdrop > .button.titlebutton, .linked:not(.vertical) > .entry, .inline-toolbar .button, .inline-toolbar .header-bar .button.titlebutton, .header-bar .inline-toolbar .button.titlebutton, .inline-toolbar .titlebar .button.titlebutton, .titlebar .inline-toolbar .button.titlebutton, .inline-toolbar .button:backdrop, .linked > .button, .header-bar .linked > .button.titlebutton, .titlebar .linked > .button.titlebutton, .linked > .button:hover, .linked > .button:active, .linked > .button:checked, .linked > .button:backdrop, .linked > GtkComboBox > .the-button-in-the-combobox:dir(ltr), .linked > GtkComboBox > .the-button-in-the-combobox:dir(rtl), @@ -1082,7 +1066,7 @@ GtkTextView { border-radius: 0; border-right-style: none; } -.linked:not(.vertical) > .entry:first-child, .osd .button:first-child:hover, .osd .button:first-child:active, .osd .button:first-child:checked, .osd .button:first-child:insensitive, .osd .button:first-child:backdrop, .osd .button.suggested-action:first-child, .osd .button.destructive-action:first-child, .inline-toolbar .button:first-child, .linked > .button:first-child, .header-bar .linked > .button.titlebutton:first-child, +.linked:not(.vertical) > .entry:first-child, .inline-toolbar .button:first-child, .linked > .button:first-child, .header-bar .linked > .button.titlebutton:first-child, .titlebar .linked > .button.titlebutton:first-child, .inline-toolbar.toolbar GtkToolButton:first-child > .button.flat, .inline-toolbar GtkToolButton:first-child > .button.flat, .inline-toolbar.search-bar GtkToolButton:first-child > .button.flat, .inline-toolbar.location-bar GtkToolButton:first-child > .button.flat, .inline-toolbar.toolbar GtkToolButton:first-child > .sidebar-button.button, .inline-toolbar GtkToolButton:first-child > .sidebar-button.button, .inline-toolbar.search-bar GtkToolButton:first-child > .sidebar-button.button, .inline-toolbar.location-bar GtkToolButton:first-child > .sidebar-button.button, .inline-toolbar .header-bar GtkToolButton:first-child > .button.titlebutton, .header-bar .inline-toolbar GtkToolButton:first-child > .button.titlebutton, .inline-toolbar .titlebar GtkToolButton:first-child > .button.titlebutton, .titlebar .inline-toolbar GtkToolButton:first-child > .button.titlebutton, @@ -1101,7 +1085,7 @@ GtkTextView { .linked > GtkComboBoxText:first-child > .the-button-in-the-combobox { border-top-left-radius: 3px; border-bottom-left-radius: 3px; } -.linked:not(.vertical) > .entry:last-child, .osd .button:last-child:hover, .osd .button:last-child:active, .osd .button:last-child:checked, .osd .button:last-child:insensitive, .osd .button:last-child:backdrop, .osd .button.suggested-action:last-child, .osd .button.destructive-action:last-child, .inline-toolbar .button:last-child, .linked > .button:last-child, .header-bar .linked > .button.titlebutton:last-child, +.linked:not(.vertical) > .entry:last-child, .inline-toolbar .button:last-child, .linked > .button:last-child, .header-bar .linked > .button.titlebutton:last-child, .titlebar .linked > .button.titlebutton:last-child, .inline-toolbar.toolbar GtkToolButton:last-child > .button.flat, .inline-toolbar GtkToolButton:last-child > .button.flat, .inline-toolbar.search-bar GtkToolButton:last-child > .button.flat, .inline-toolbar.location-bar GtkToolButton:last-child > .button.flat, .inline-toolbar.toolbar GtkToolButton:last-child > .sidebar-button.button, .inline-toolbar GtkToolButton:last-child > .sidebar-button.button, .inline-toolbar.search-bar GtkToolButton:last-child > .sidebar-button.button, .inline-toolbar.location-bar GtkToolButton:last-child > .sidebar-button.button, .inline-toolbar .header-bar GtkToolButton:last-child > .button.titlebutton, .header-bar .inline-toolbar GtkToolButton:last-child > .button.titlebutton, .inline-toolbar .titlebar GtkToolButton:last-child > .button.titlebutton, .titlebar .inline-toolbar GtkToolButton:last-child > .button.titlebutton, @@ -1121,7 +1105,7 @@ GtkTextView { border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-right-style: solid; } -.linked:not(.vertical) > .entry:only-child, .osd .button:only-child:hover, .osd .button:only-child:active, .osd .button:only-child:checked, .osd .button:only-child:insensitive, .osd .button:only-child:backdrop, .osd .button.suggested-action:only-child, .osd .button.destructive-action:only-child, .inline-toolbar .button:only-child, .linked > .button:only-child, .header-bar .linked > .button.titlebutton:only-child, +.linked:not(.vertical) > .entry:only-child, .inline-toolbar .button:only-child, .linked > .button:only-child, .header-bar .linked > .button.titlebutton:only-child, .titlebar .linked > .button.titlebutton:only-child, .inline-toolbar.toolbar GtkToolButton:only-child > .button.flat, .inline-toolbar GtkToolButton:only-child > .button.flat, .inline-toolbar.search-bar GtkToolButton:only-child > .button.flat, .inline-toolbar.location-bar GtkToolButton:only-child > .button.flat, .inline-toolbar.toolbar GtkToolButton:only-child > .sidebar-button.button, .inline-toolbar GtkToolButton:only-child > .sidebar-button.button, .inline-toolbar.search-bar GtkToolButton:only-child > .sidebar-button.button, .inline-toolbar.location-bar GtkToolButton:only-child > .sidebar-button.button, .inline-toolbar .header-bar GtkToolButton:only-child > .button.titlebutton, .header-bar .inline-toolbar GtkToolButton:only-child > .button.titlebutton, .inline-toolbar .titlebar GtkToolButton:only-child > .button.titlebutton, .titlebar .inline-toolbar GtkToolButton:only-child > .button.titlebutton, -- 2.30.2